package com.liveinstars.activity.business.clockin.service.impl;

import com.baidu.unbiz.easymapper.MapperFactory;
import com.liveinstars.activity.business.clockin.repository.po.Clockin;
import com.liveinstars.api.dto.ClockinDto;
import org.springframework.stereotype.Service;

/**
 * 进行po和实体的转换，和event的生成等工作
 */
@Service
public class ClockInFactory {
    public ClockinDto getClockInDto(Clockin clockin) {
        return MapperFactory.getCopyByRefMapper().mapClass(Clockin.class, ClockinDto.class).register()
                    .map(clockin, ClockinDto.class);

    }
}
